<!--#include file="inc/conn.asp" -->
<%CheckAdmin()%>
<!--#include file="inc/pageClass.asp"-->

<!--#include file="inc/Function.asp" -->
<%
strtitle=ServerName&"-数据统计"
If request("Action") = "Del" And request("Id") <>"" Then
Id = Trim(checkstr(request("Id")))
set rs=conn.execute("Delete  from Web_News where Id="&Id )
End If

  'sql="SELECT ID,Title,Author,NewsDate,noticle,news,topid FROM Web_News order by topid desc"
  sql="SELECT * FROM Web_News order by topid desc"
  Set Rs = Server.CreateObject("ADODB.Recordset")
  Rs.Open sql,conn,1,1
  Set page = New PageClass
    page.rs=Rs					'直接传递rs对象，传递成功后会自动关闭。如需要开启，请注释掉分页类的第87行val.Close。
    page.PageSize=Mypagesize					'分页大小
    page.setCount=-1					'可选。设置数据总数。0：使用RecordCount，-1：使用Count（默认），其他正数：指定的数据总数。字符串：获取数据总数的SQL。
    page.PageID="p"					'Request.QueryString中分页参数字符串


Call  head(strtitle)
	Call  LeftMenu


%>


  <!-- 右侧主体开始 -->
  <div class="page-content">
<%Call  mnav()%>	
<div class="weadmin-body">



 <div class="layui-card">
<div class="layui-card-body">
<table width="99%" cellpadding="2" cellspacing="0">
  <tr>
    <td width="50%">

<form class="layui-form layui-col-space5" action="Log_List.asp" method="get">
								
                                <div class="layui-inline layui-show-xs-block">
                                    <input type="text" name="txtSearch"  placeholder="请输入关键字" autocomplete="off" class="layui-input" style="width:260px">

                                </div>
								<div class="layui-inline layui-show-xs-block">
								<input type="checkbox" name="SearchType" title="精确" value="1">
								</div>
                                <div class="layui-inline layui-show-xs-block">
                                    <button class="layui-btn layui-btn-normal layui-btn-sm"  lay-submit="" lay-filter="sreach"><i class="layui-icon">&#xe615;</i>日志搜索</button>
                                </div>
                            </form>

		
		</td>
    <td>
	<div style="float: right;">
	<a href="NewsEdit.asp"><button type="button" class="layui-btn layui-btn-primary">公告列表</button></a>  &nbsp;
   <a href="NewsEdit.asp"><button type="button" class="layui-btn">发布公告</button></a> &nbsp;
	</div>
                        </div>
	</td>
  </tr>
</table>

                        </div>
                    </div>


                        <div class="layui-card-body layui-table-body layui-table-main" style="margin-top:-13px">
                            <table class="layui-table layui-form">
                                <thead>
                                  <tr>
                                    <th height="35">id</th>
                                    <th>用户</th>
                                    <th>标题</th>
                                    <th>发生时间</th>
                                    <th>操作</th>
									</tr>
                                </thead>
                                <tbody>
								       <%
									  If page.eof Or page.bof Then 
									 response.write "<TR><TD>没有找到任何记录...</TD></TR>"
									 Else
										
									 Do While Not page.EOF
									 %>


		 <tr>
            <td style="width: 20px; height:30px"  ><%=page("id")%></td>
            <td> <%if page("NewsClass")=0 then response.write "玩家攻略" else response.write "网站公告"%></td>
            <td><a href="NewsEdit.Asp?ID=<%=page("ID")%>"><%=page("title")%></a></td>
            <td><%=page("NewsDate")%></td>
            <td><a href="News.asp?Action=Del&Id=<%=page("ID")%>">删除</a></td>
          </tr>

                                                                
<%
   page.MoveNext
	Loop
	End If 
		 %>
                                </tbody>
                            </table>
                        </div>
                        <div class="layui-card-body ">
                            <div class="page">
                                <div>
								<%=page.Control(10,"{Ctrl} {State}")%>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>



	<%
Set Rs = Nothing
Set page = Nothing
conn.Close
Set conn = Nothing
%>
    </body>


